package com.sunlee.common.service.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.sunlee.common.core.validator.group.AddGroup;
import com.sunlee.common.core.validator.group.DefaultGroup;
import com.sunlee.common.core.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;

/**
 * 商品分类映射
 */
@Data
@ApiModel(value = "商品分类映射表")
public class ProductCategoryMappingDTO implements Serializable {

    @ApiModelProperty(value = "主键")
    @Null(message = "ID必须为空", groups = AddGroup.class)
    @NotNull(message = "ID不能为空", groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty(value = "商品ID")
    @NotNull(message = "商品ID不能为空", groups = DefaultGroup.class)
    private Long productId;

    @NotNull(message = "分类ID不能为空", groups = DefaultGroup.class)
    @ApiModelProperty(value = "分类ID")
    private Long categoryId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}